<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //数组的追加
        let arr=["tw","唐玮"];
        let learn=["js","css"];
    //    let arr1=arr+learn;
    //    console.log(arr1);//tw,唐玮js,css
        //展开
        arr=[...arr,...learn];
        console.log(arr);//['tw', '唐玮', 'js', 'css']

        //展开语法的举例
        // function func(...args){//可以直接写为args
        //     alert("func调用成功");
        
        // }
        // func(12,21,54);

        let arr111=["唐玮","sasa"];
        let [name,value]=[...arr111];
        console.log(name,value);
    </script>
</body>
</html>